package com.demo.service.impl;

import com.demo.dao.IPermissionDao;
import com.demo.entity.Permission;
import com.demo.service.IPermissionService;
import com.demo.vo.PermissionVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl implements IPermissionService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private IPermissionDao userDao;

    @Override
    public List<Permission> queryByPage(PermissionVo user) {
        return null;
    }


    @Override
    public int deleteByPrimaryKey(Integer id) {
        return userDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Permission record) {
        return userDao.insert(record);
    }

    @Override
    public int insertSelective(Permission record) {
        return userDao.insertSelective(record);
    }

    @Override
    public Permission selectByPrimaryKey(Integer id) {
        return userDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Permission record) {
        return userDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<Permission> getPermissionByUserID(int userid) {
        return userDao.getPermissionByUserID(userid);
    }


    @Override
    public int queryCount(PermissionVo user) {
        return 0;
    }

}
